package com.itly.rwzq.service.lmpl;

import com.itly.rwzq.dao.DataPresentationDao;
import com.itly.rwzq.pojo.DataTemp;
import com.itly.rwzq.service.DataPresentationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import static com.itly.rwzq.utils.SendRequest.sendRequest;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 罗言
 * @Version: 1.0
 * @Date: 2023-11-29-16:17
 * @Description: 数据简报
 */
@Service
public class DataPresentationServiceImpl implements DataPresentationService {

    @Autowired
    private DataPresentationDao dao;

    @Override
    public String getData(String url, String type) {
        return sendRequest(url, type);
    }

    @Override
    public DataTemp getInfo(int id) {
        return dao.getInfo(id);
    }

    @Override
    public boolean update(String data, int id) {
        return dao.update(data, id) > 0;
    }
}
